function InitFormSchema()
{
  var defaultValue = '';
  if (window.issueKey) {
    try {
      defaultValue = dataObject.getData(window.issueKey);
      Logger.debug('syncTicketForm ' + window.issueKey + ' Developer:', defaultValue);
    } catch (e) {
      Logger.error('InitFormSchema error:', e);
    }
  }
  
  return {
    "schema": {
      "developer": {
        "id": 'developer',
        "title": "Developer: ",
        "type": "string",
        "default": defaultValue
      }
  },
  "form": [
    {
      "key": "developer",
      "id": "developer",
      "onChange": function (evt) {
        var value = $(evt.target).val();
        // if (value) alert(value);
        // set to localStrong
        // if (window.issueKey) {
        //   dataObject.setData(window.issueKey, value);
        // }
      }
    },
    {
      "type": "button",
      "title": "Sync",
      "fieldHtmlClass":"aui-button aui-button-primary aui-style",
      "id": "sync-submit", 
      "onClick": function (evt) {
        evt.preventDefault();
        // get developer
        let developer = jQuery('#developer').val();
            dataObject.setData(window.issueKey, developer);
        //jQuery('#sync-submit').hide();
        jQuery('#sync-loading').remove();
        jQuery('#'+evt.currentTarget.id).parent().append('<div id="sync-loading" class="lds-dual-ring"></div>');

        try {
          let record = {
            'key': dataObject.keyFilter(window.issueKey),
            'user':developer,
            'ver': jQuery('#fixVersions-field a').text().replace('v','').replace('.','').replace('.','')
          };
          Logger.debug('save record', record);
          let response = window.remoteStore.save(record);
          if (localStorage.getItem('jira-sync-turnon')!=0) {
            response.then(function(resp) {
                if (resp.status=='success') {
                  jQuery('#sync-loading').remove();
                }
              })
          }
        } catch (e) {
          Logger.error('RemoteStore Save:', e);
        }

        // enable sync jira
        if (localStorage.getItem('jira-sync-turnon')==1) {
          sourceJira.syncOne(window.issueKey);
        }
      }
    }
  ],
  "params": {
    "fieldHtmlClass": "input-small"
  }
  };
}

